#ifndef COLLABORATIONPROTOCOL_H
#define COLLABORATIONPROTOCOL_H

#include <wx/string.h>
#include <wx/datetime.h>
#include <vector>

class CollaborationMessage
{
public:
    enum MessageType {
        MODEL_EDIT = 1,
        COMPONENT_ADD = 2,
        TEST_RESULT = 3,
        REVIEW_REQUEST = 4,
        MERGE_PROPOSAL = 5
    };

    CollaborationMessage();
    CollaborationMessage(MessageType type, const wxString& sender, const wxString& content);

    wxString Serialize() const;
    bool Deserialize(const wxString& data);

    MessageType GetType() const { return m_type; }
    wxString GetSender() const { return m_sender; }
    wxString GetContent() const { return m_content; }
    wxDateTime GetTimestamp() const { return m_timestamp; }
    wxString GetMessageId() const { return m_messageId; }

private:
    MessageType m_type;
    wxString m_sender;
    wxString m_content;
    wxDateTime m_timestamp;
    wxString m_messageId;
    std::vector<wxString> m_attachments;

    wxString GenerateMessageId() const;
};

#endif
